#include"list.h"
int main(void)
{
	list * l;
	datatype arr[] = {12,9,23,2,34,6,45};
	l = list_create();
	if(l == NULL)
		printf("创建失败\n");
	for (int i = 0; i < sizeof(arr) / sizeof(*arr); i++)
	{
		//if (list_insert_at(l, i, &arr[i]))        //按顺序插入
		//	;//exit(1);
		list_order_insert(l,&arr[i]);             //按大小插入
		;	
	}
	list_display(l);

	datatype value = 12;
	list_delete(l,&value);
	list_display(l);

	list_delete_at(l,2,&value);
	printf("delete value = %d\n", value);
	list_display(l);

	list_destory(&l);
	list_display(l);

	return 0;
}